package com.lighthouse.doc.comment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 文档-用户评论关联对象 lh_rel_doc_comment
 * 
 * @author ysz
 * @date 2023-05-10
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class KnowledgeDocComment
{
    private static final long serialVersionUID = 1L;

    /** 评论id */
    private String commentId;

    /** 文档id */
    @Excel(name = "文档id")
    private String docId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String commentInfo;

    /** 1-已删除，0-未删除 */
    @Excel(name = "1-已删除，0-未删除")
    private String isDelete;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    /** 父id */
    @Excel(name = "父id")
    private String parentId;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    public void setCommentId(String commentId) 
    {
        this.commentId = commentId;
    }

    public String getCommentId() 
    {
        return commentId;
    }
    public void setDocId(String docId) 
    {
        this.docId = docId;
    }

    public String getDocId() 
    {
        return docId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setCommentInfo(String commentInfo) 
    {
        this.commentInfo = commentInfo;
    }

    public String getCommentInfo() 
    {
        return commentInfo;
    }
    public void setIsDelete(String isDelete) 
    {
        this.isDelete = isDelete;
    }

    public String getIsDelete() 
    {
        return isDelete;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }
    public void setParentId(String parentId) 
    {
        this.parentId = parentId;
    }

    public String getParentId() 
    {
        return parentId;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commentId", getCommentId())
            .append("docId", getDocId())
            .append("userId", getUserId())
            .append("commentInfo", getCommentInfo())
            .append("isDelete", getIsDelete())
            .append("sort", getSort())
            .append("parentId", getParentId())
            .append("createTime", getCreateTime())
            .toString();
    }
}
